/**
  ******************************************************************************
  * @file    bsp_led.h
  * @author  Iron
  * @date    2018-08-03
  * @version v1.0
  * @brief   led header file
  */

#ifndef __BSP_LED_H
#define __BSP_LED_H

#ifdef __cplusplus
extern "C" {
#endif

/* includes -------------------------------------------------------------------*/
#include <stdint.h>

/* exported define ------------------------------------------------------------*/
#define LED_1   0x01
#define LED_2   0x02
#define LED_3   0x04
#define LED_4   0x08

#define LED_ALL 0xFF

#define LED_MODE_OFF      0x00
#define LED_MODE_ON       0x01

#define LED_SYSTEM  LED_1
#define LED_STATUS  LED_2
#define LED_GPRS        LED_3
#define LED_GPS         LED_4

/* exported types ------------------------------------------------------------*/
/* exported constants --------------------------------------------------------*/
/* exported macro ------------------------------------------------------------*/
/* exported functions ------------------------------------------------------- */
int led_init(void);
void led_set(uint32_t leds, uint32_t mode);
void led_toggle(uint32_t leds);
void led_blink(uint32_t leds, uint32_t numBlinks, uint32_t percent, uint32_t percent_max, uint32_t period);
uint32_t led_get_state(void);

/**
  * @}
  */

#ifdef __cplusplus
}
#endif

#endif /* __BSP_LED_H */

/******************* (C)COPYRIGHT 2018 *****END OF FILE***********************/
